Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubocop configuration update #21

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

michalgoldys
Copy link

Update configuration of rubocop.yml
Update project version and dependencies
Re-generate Gemfile.lock that contains new versions of gems
Update line-length value

@michalgoldys michalgoldys self-assigned this Jul 21, 2021
ragnarson-stylecheck.gemspec Outdated Show resolved Hide resolved
Metrics/LineLength:
Max: 120
Layout/LineLength:
Max: 130
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

120 was a good value, why change?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That change was introduced by me because in one of our Ragnarson-generic recipes line length was bigger then 120, but I didn't thought about breaking lines to make it fit rubocop requirements.
Im going to revert that change, back to 120.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalgoldys 120 column length rule is an industry-standard and we'd like to comply with it.

Copy link
Contributor

@stuszynski stuszynski Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find more info in the cop description - https://rubystyle.guide/#max-line-length

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuszynski Yeah, you're right. I've already made a change to that file ;) I won't mess with it again. Sorry for hearth attack :)

@@ -7,10 +7,11 @@ AllCops:
- bin/**
- vendor/bundle/**/*
- node_modules/**/*
NewCops: disable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because new crops can affect style of our code in way that we don't want, and due to that I wasn't sure if it will be right approach.
I can enable all of new cops, and check how they will affect our code. Or just, enable it. Please let me know what you think.

s.email = "[email protected]"
s.files = Dir["{config,lib}/**/*", "MIT-LICENSE", "README.md", "./"]
s.homepage = "https://github.com/ragnarson/ragnarson-stylecheck"
s.license = "MIT"

s.add_development_dependency "bundler", "~> 1.10"
s.add_dependency "rake", ">= 10.0"
s.add_dependency "rubocop", "~> 0.64"
s.add_dependency "rubocop", "~> 0.93.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not the latest stable release? 1.18.3? Are there too many breaking changes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have bumped rubocop version to meet requirements of Cookstyle gem that we will be migrating to due to deprecation of Foodcritic.
But you're right, I've already bumped rubocop version to latest one, and pushed changes.
We could use higher version of Cookstyle.

Copy link
Contributor

@stuszynski stuszynski Jul 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of The Good Scout rules says that if you're about to bump any version of any dependency (chef, gem, or whatever) you should always aim for the latest stable version available. Unless you see any potential problems (e.g. with API incompatibility, refactor) that you don't have time to deal with.

If you can't do it. A good next action would be to leave a comment about those potential issues in the code. Ideally, if you can't upgrade to the latest stable release, you should create a task ticket for doing it - and describe all the findings you already gather.

@michalgoldys
Copy link
Author

@grk @stuszynski @pdomagala
Do we have any offenses or can we close pull request and merge it to master?

@michalgoldys michalgoldys requested a review from grk July 30, 2021 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants